package tests;

import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

/**
 * Created by WHOover on 21.06.2014.
 */
public class StringsCompare {
    @DataProvider(name = "test1")
    public Object[][] createData() {
        return new Object[][] {
                { "abcdefghij", 1 },
                { "aaaaaaaaaa", 2 },
                { "cccccccccc", 3}
        };
    }

    @Test(dataProvider = "test1")
    public void stringsCompare(String n1, int n2) {
        int len = 10;

        if ( n1.length() == len ) {
            System.out.println(n2 + ". Length of string == " + len + ". PASSED.");
        }
        Assert.assertEquals(n1.length(), len);
    }
}
